package com.lwz.laboratory.service;

import com.lwz.laboratory.dao.DepartmentMapper;
import com.lwz.laboratory.dao.RecruitplanMapper;
import com.lwz.laboratory.dao.TechnicianMapper;
import com.lwz.laboratory.entity.Department;
import com.lwz.laboratory.entity.Recruitplan;
import com.lwz.laboratory.entity.Technician;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TechnicianService {
    @Autowired
    private TechnicianMapper technicianMapper;


    public List<Technician> getAlltec(String tecname){
        return technicianMapper.getTeclist(tecname);

    }

    public Technician getonetec(Integer id){
        return technicianMapper.selectByPrimaryKey(id);

    }

    public Technician getonebyworkid(String workid){
        return technicianMapper.selectByworkid(workid);

    }

    public void Adddep(Technician technician){
        technicianMapper.insertSelective(technician);

    }

    public void Updatetec(Technician technician){
        technicianMapper.updateByPrimaryKeySelective(technician);

    }

    public void Deldep(Integer id){
        technicianMapper.deleteByPrimaryKey(id);

    }


}
